//显示对应新闻标题、图片、链接
function showPic(whichPic) {
    //显示新闻图片的对象
    var placeholder=document.getElementById("placeholder");
    //显示新闻标题和链接的对象
    var description=document.getElementById("description");
    //显示内容数据
    //图片
    var imgSrc=whichPic.getAttribute("data-image");
    //标题
    var newsTitle=whichPic.getAttribute("title");
    //链接地址
    var url=whichPic.getAttribute("data-url");
    console.log(imgSrc+"|"+newsTitle+"|"+url);
    //设置内容
    placeholder.setAttribute("src",imgSrc);
    description.setAttribute("href",url);
    description.innerText=newsTitle;
}